<?php
##查看优惠信息
require_once 'global.php';
$conn=  db_connect();
$sql="select * from discount";
$result=  mysqli_query($conn, $sql) or die_db_error($conn);
$num=  mysqli_num_rows($result);
//echo $num;
while($row= mysqli_fetch_assoc($result)){
    $rows[]=$row;
}

//for($i=0;$i<$num;$i++){
//$discount=array('discount'=>$rows[$i]['discount']);
//    echo to_json($discount);
//}


